package br.usp.ime.protoc.client;

import java.util.List;

import br.usp.ime.protoc.pessoa.Telefone;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface TelefoneService extends RemoteService {

	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {

		private static TelefoneServiceAsync instance;

		public static TelefoneServiceAsync getInstance() {
			if (instance == null) {
				instance = (TelefoneServiceAsync) GWT
						.create(TelefoneService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getModuleBaseURL()
						+ "/TelefoneService");
			}
			return instance;
		}
	}

	/**
	 * Obtem Telefones.
	 */
	public List<Telefone> obterTelefones();

	/**
	 * Incluir Telefone.
	 */
	public Boolean incluirTelefone(Telefone telefone);

	/**
	 * Alterar Telefone.
	 */
	public Boolean alterarTelefone(Telefone telefone, Telefone telefoneAlterado);

	/**
	 * Excluir Telefone.
	 */
	public Boolean excluirTelefone(Telefone telefone);

}
